You are here: Symbol Reference > Dew Namespace > Dew.Stats Namespace > Dew.Stats.Units Namespace > Classes > Statistics Class > Statistics Methods > CumulativeHist Method > Statistics.CumulativeHist Method ([In] TVec, [In] int, [In] TVec, [In] TVec, bool)
Dew Stats for .NET
ContentsIndexHome
PreviousUpNext
Statistics.CumulativeHist Method ([In] TVec, [In] int, [In] TVec, [In] TVec, bool)

Divide the Data vector elements into NumBins equal intervals.

Syntax
C#
Visual Basic
public static void CumulativeHist([In] TVec Data, [In] int NumBins, [In] TVec Results, [In] TVec Bins, bool CenterBins);

The number of elements falling in each interval is counted and the relative cumulative frequency for each interval is written to the Results vector. if CenterBins is true then Bins will store bins center points. If CenterBins is false, Bins will store bins edges. The Length and Complex properties of the Results and Bins vectors are adjusted automatically. 

Note Use this version if you need equidistant cumulative histogram.

Equal bins -> faster algorithm.

using Dew.Math; using Dew.Stats; using Dew.Stats.Units; namespace Dew.Examples { private void Example() { Vector Data = new Vector(1000, false); Vector Bins = new Vector(0); Vector CumRelFreq = new Vector(0); // generate some normally distributed data StatRandom.RandomNormal(-3.0, 0.2, Data, -1); Statistics.CumulativeHist(Data, 15, CumRelFreq, Bins, false); // Bins holds the 15 intervals centerpoints // and CumRelFreq holds the relative cumulative count of // elements in each bin. } }
Copyright (c) 1999-2024 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!